﻿namespace WinRTClient.ViewModels
{
    using System;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    using StyleMVVM.DependencyInjection;
    using StyleMVVM.ViewModel;

    using WinRTClient.Model;

    using Windows.UI.Xaml.Navigation;

    using dot_in.HTWKAidStation.Client.Timetable;

    public class EventDetailViewModel : PageViewModel
    {
        private Event selectedEvent;

        public ObservableCollection<Event> Events { get; set; }

        public Event SelectedEvent
        {
            get
            {
                return this.selectedEvent;
            }

            set
            {
                this.selectedEvent = value;
                this.OnPropertyChanged();
            }
        }

        protected override void OnNavigatedTo(object sender, StyleMVVM.View.StyleNavigationEventArgs e)
        {
            this.Events = ((SelectedEventNavigationArgs)this.NavigationParameter).Events;
            this.SelectedEvent = ((SelectedEventNavigationArgs)this.NavigationParameter).SelectedEvent;
            base.OnNavigatedTo(sender, e);
        }
    }
}
